<?php
namespace app\common\validate;

use think\validate;

class AdminValidate extends validate
{
    protected $rule = [
        'account' => 'require|unique:admin',
        'pwd'      => 'require|min:6|max:25|confirm:pwd2',
    ];

    protected $scene = [
        'edit' => ['pwd'  => 'min:6|max:25|confirm:pwd2']
    ];

    protected $message = [
        'account.require' => '帐号不能为空',
        'account.unique'  => '帐号已经存在',
        'pwd.require'      => '请输入密码',
        'pwd.min'          => '密码不能少于6个字符',
        'pwd.max'          => '密码不能超过25个字符',
        'pwd.confirm'      => '两次输入的密码不相同',
    ];


}
